\version "2.14.0"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% PAGE LAYOUT (MELODY ONLY)

\score {
  <<
    \new ChordNames {
      \set chordChanges = ##t
      \hymnHarmonies
    }
    \new Staff
    <<
      \clef "treble"
      \new Voice = "sop" { \global \aSop }
    >>

    \verseLayout

  >>
}

\layout {
  \context { \Staff
    %{suppressTimeSignature?
      \remove "Time_signature_engraver"
    %}
    %{suppressStems?
    \override Stem #'no-stem-extend = ##t
      \override Stem #'details = #'((lengths 0 0 0 0 0 0)
                                (beamed-lengths 0 0 0)
                                (beamed-minimum-free-lengths 0 0 0)
                                (beamed-extreme-minimum-free-lengths 0 0)
                                (stem-shorten 0 0))
      \override Stem #'X-offset = #0.75 %% Move stem to middle of notehead
      \override Stem #'stencil = ##f %% make stems invisible
      \override Flag #'stencil = ##f
      \override Tie #'details #'ratio = #0.5
      \override Tie #'details #'same-dir-as-stem-penalty = #0
      \override Tie #'details #'stem-gap = #0
      \override Tie #'details #'staff-line-collision-penalty = #0
      \override Tie #'details #'vertical-distance-penalty-factor = #0
      \override StaffSpacing #'stem-spacing-correction = #-100
    %}
    \override StaffSymbol #'width = #(lambda (grob)
      (ly:output-def-lookup (ly:grob-layout grob) 'line-width))
  }
  \context { \Score
    \remove "Bar_number_engraver"
    \override SpacingSpanner
      #'base-shortest-duration = #(ly:make-moment 1 16)
    %\override Rest #'transparent = ##t
  }
  \context { \Lyrics
    \consists "Separating_line_group_engraver"
    \override BarLine #'transparent = ##t
    \override LyricText #'font-family = #'normal
    \override LyricText #'font-size = \lyricSize
    \override LyricSpace #'minimum-distance = #1.0
    \override StanzaNumber #'font-family = #'normal 
    \override StanzaNumber #'font-series = #'normal 
    \override StanzaNumber #'font-size = \lyricSize
    \override VerticalAxisGroup #'staff-affinity = #UP
    \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing = #'((basic-distance . 0)
     (minimum-distance . 5.5)
     (padding . 1.0)
     (stretchability . 0))
    \override VerticalAxisGroup #'nonstaff-nonstaff-spacing #'minimum-distance = \lyricMinDistance
  }
  \context { \ChordNames %% for guitar chords
    \override ChordName #'font-size = #0.5
    \override ChordName #'font-family = #'normal
    \override ChordName #'stencil = #centerCN 
    \override ChordName #'extra-offset = #'(0.75 . 0.0)
  } 
}